<!--
 * @Author: haoshenpei
 * @Date: 2025-02-24 16:27:48
 * @LastEditors: hyman
 * @LastEditTime: 2025-02-26 14:02:45
 * @Description: 请填写简介
-->
<template>
    <div>
        <div style="font-size:32px; color:#8f3;">页面b</div>
        <a-button @click="showModal">新增</a-button>
        
        <myModal :list="properties" ref="modal" :model="model" @change="changeF" key="b-modal" />
    
    </div>
</template>

<script>
    import myModal from './myModal.vue';
    export default {
        components:{
            myModal
        },
        data(){
            return {
                properties:[
                    {type:'inputWiget',field:'name1'},
                    {type:'textareaWiget',field:'name2'},
                    {type:'selectWiget',field:'name3'},
                    {type:'inputWiget',field:'name4'},
                    {type:'inputWiget',field:'name5'},
                    {type:'inputWiget',field:'name6'},
                ],
               model:{
                name1:'',
                name2:'',
                name3:'',
                name4:'',
                name5:'',
                name6:'',
               }
            }
        },
        methods:{
            showModal(){
                this.$refs.modal.showModal()
            },
            changeF(data){
                this.model[data.field] = data.value
                //console.log('this.model',this.model)
            },
        }
    }
</script>

<style scoped>

</style>